#ifndef CMDTHREAD_H
#define CMDTHREAD_H

#include <QThread>
#include <QFile>
#include <QDebug>
#include <QProcess>
#include "db_installed_imformation.h"
#include <QString>
#include <stdio.h>
#include <fstream>
#include <string>
#include <QtNetwork/QHostInfo>
#include <stdlib.h>
using namespace std;
#include <QNetworkInterface>
#include <QList>
#include <QHash>
#include <QDesktopServices>
#include <QUrl>
#include <QEventLoop>
#include <QTimer>
#include <QNetworkRequest>
#include <QNetworkAccessManager>
#include <QHttpPart>
#include <QDBusInterface>
#include <QDBusReply>
#include <QDBusObjectPath>
#include <QMessageBox>
#include <QPushButton>

class CMDThread : public QThread
{
    Q_OBJECT
public:
    QString ip = "";
    QString version = "";
    QString soft_version = "";
    QString time3 = "";
    QString datetime = "";
    QString host_mac = "";
    QString SPpkg_version = "";
    QString LuanchMode;
    explicit CMDThread(QString mode,QObject *parent = 0);
    static int qflag;
    QByteArray procoutput;
    QString app_version;
    QString app_description;
    void insert_imformation_to_db(QString);
    void get_version_and_description();
    void get_pingback_value();
    void pingback(QString);
    QString get_appversion(char *);
    bool get_battery();

private:
    void run();


signals:
    void signal_cmd_out(QString);
    void signal_messagebox();
    void signal_is_complete(int);
    void get_file_name(QString);
    void signal_hide_mainwindow();
    void signal_lower_battery();
//    void signal_pb_startupdate_enabled();

public slots:




};

#endif // CMDTHREAD_H
